Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 2 - Shape Objects / Shape Objects Reference
Functions / Creating and Manipulating Shape Objects


GXDisposeShape

You can use the GXDisposeShape function to release a reference to a shape.

void GXDisposeShape(gxShape target);
target
A reference to the shape to dispose of.
DESCRIPTION
The GXDisposeShape function decrements the owner count of the shape specified by the target parameter and releases any memory used by the shape if the owner count goes to 0.

SPECIAL CONSIDERATIONS
You cannot dispose of a shape that is locked, either because the gxLockedShape attribute is set or because GXLockShape was called to lock the shape. Depending on how the shape became locked, you must call GXSetShapeAttributes or GXUnlockShape before calling GXDisposeShape on a locked shape.

ERRORS, WARNINGS, AND NOTICES
Errors 
shape_is_nil 
shape_access_not_allowed(debugging version)
Warnings 
cannot_dispose_default_shape(debugging version)
SEE ALSO
Owner counts are discussed in the section "Copying, Comparing, and Cloning Shape Objects" beginning on page 2-25, and in the section "Manipulating a Shape Object's Owner Count" beginning on page 2-31.

To examine the owner count of a shape, use the GXGetShapeOwners function, described on page 2-76. To increment the owner count of a shape, use the GXCloneShape function, described on page 2-61.

For an example of the use of this function, see page 2-24.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996